package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_Table(name = "s_pay", simpleName = "", engine = MysqlDriver.InnoDB, comment = "结算表")
public class _DDL_SPay {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "原订单流水")
    private java.math.BigInteger id;

    @_DDL_Index(name = "IDX_s_pay_rp_id")
    @_DDL_Column(name = "rp_id", type = SqlType.INT_UNSIGNED, comment = "结算report id,批次号")
    private Long rpId;

    @_DDL_Column(name = "remark", type = SqlType.VARCHAR, size = 300, comment = "备注，有问题写入")
    private String remark;

    @_DDL_Column(name = "usr_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "用户id")
    private Long usrId;

    @_DDL_Column(name = "ag_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "渠道商id")
    private Long agId;

    @_DDL_Index(name = "IDX_s_pay_mer_id")
    @_DDL_Column(name = "mer_id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "商户id")
    private java.math.BigInteger merId;

    @_DDL_Column(name = "dev_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "设备id")
    private Long devId;

    @_DDL_Column(name = "tag", type = SqlType.SMALLINT_UNSIGNED, nullable = false, comment = "标签id")
    private Integer tag;

    @_DDL_Column(name = "qb_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "钱包id")
    private Long qbId;

    @_DDL_Column(name = "date", type = SqlType.INT_UNSIGNED, nullable = false, comment = "交易日期")
    private Long date;

    @_DDL_Column(name = "ch_id", type = SqlType.VARCHAR, size = 30, nullable = false, comment = "第三方交易流水")
    private String chId;

    @_DDL_Column(name = "ch_type", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "第三方类型")
    private Integer chType;

    @_DDL_Column(name = "ch_time", type = SqlType.TIMESTAMP, comment = "第三方交易时间")
    private java.sql.Timestamp chTime;

    @_DDL_Column(name = "amt", type = SqlType.DECIMAL, size = 6, scale = 2, nullable = false, comment = "交易金额(元）")
    private java.math.BigDecimal amt;

    @_DDL_Column(name = "ag_amt", type = SqlType.DECIMAL, size = 6, scale = 2, comment = "渠道商手续费")
    private java.math.BigDecimal agAmt;

    @_DDL_Column(name = "mer_amt", type = SqlType.DECIMAL, size = 6, scale = 2, comment = "商户剩余金额")
    private java.math.BigDecimal merAmt;

    @_DDL_Column(name = "plat_amt", type = SqlType.DECIMAL, size = 6, scale = 2, comment = "平台手续费")
    private java.math.BigDecimal platAmt;

    @_DDL_Column(name = "state", type = SqlType.TINYINT_UNSIGNED, comment = "状态 0:入库 1:打款中 2：打款成功 3：打款异常")
    private Integer state;

    @_DDL_Column(name = "s_date", type = SqlType.INT_UNSIGNED, nullable = false, comment = "结算日期")
    private Long sDate;

    @_DDL_Column(name = "cr_time", type = SqlType.TIMESTAMP, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP, comment = "入库时间")
    private java.sql.Timestamp crTime;

    @_DDL_Column(name = "ord_id", type = SqlType.VARCHAR, size = 30, comment = "第三方订单号")
    private String ordId;

    @_DDL_Column(name = "s_ch_id", type = SqlType.VARCHAR, size = 30, comment = "第三方交易流水")
    private String sChId;

    @_DDL_Column(name = "s_ch_time", type = SqlType.TIMESTAMP, comment = "第三方结算时间")
    private java.sql.Timestamp sChTime;

}
